import request from '@/utils/request'

// 查询用户培训记录列表
export function listUserTrainingRecord(query) {
  return request({
    url: '/system/userTrainingRecord/list',
    method: 'get',
    params: query
  })
}

//根据培训id查询用户培训记录列表
export function getTrainingRecordList(query) {
  return request({
    url: '/system/userTrainingRecord/getTrainingRecordList',
    method: 'get',
    params: query
  })
}

// 查询用户培训记录和培训列表
export function trainingRecordAndTrainList(query) {
  return request({
    url: '/system/userTrainingRecord/trainingRecordAndTrainList',
    method: 'get',
    params: query
  })
}

// 查询用户培训记录详细
export function getUserTrainingRecord(id) {
  return request({
    url: '/system/userTrainingRecord/' + id,
    method: 'get'
  })
}

// 新增用户培训记录
export function addUserTrainingRecord(data) {
  return request({
    url: '/system/userTrainingRecord',
    method: 'post',
    data: data
  })
}

// 修改用户培训记录
export function updateUserTrainingRecord(data) {
  return request({
    url: '/system/userTrainingRecord',
    method: 'put',
    data: data
  })
}

// 删除用户培训记录
export function delUserTrainingRecord(id) {
  return request({
    url: '/system/userTrainingRecord/' + id,
    method: 'delete'
  })
}
